<div id="content" style="background-color:#ffffff">

<div id="content-header">
  <div id="breadcrumb"> <a href="?m=admin&t=main" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 系统首页</a> <a href="#" class="current">问题列表</a> </div>
</div>
<div class="container-fluid" >
  
  <div class="row-fluid" >
  
<fieldset class="layui-elem-field layui-field-title">
  <legend>问题列表</legend>
</fieldset>

<div class="site-tips site-text">
      
           
        <form class="layui-form " action="index.php?m=admin&o=question&t=questionlist" method="post">
              <label class="layui-form-label">问题类型</label>
            <div class="layui-input-inline">
              <select name="category">
                 <option value="0"  <{if $category_id=='0'}>selected<{/if}> >请选择</option>
				 <{foreach from=$category key=myId_2 item=menu_2}>
					<option value="<{$menu_2.id}>" <{if $menu_2.id==$category_id}>selected<{/if}>><{$menu_2.name}></option>
				 <{/foreach}>
              </select>
            </div>
             
          	省
            <div class="layui-input-inline">
              <select  name="province_id" id='province' lay-filter="province">
				 <option value="0" >请选择</option>
				 <{foreach from=$provinceslist key=myId_2 item=menu_2}>
					<option value="<{$menu_2.id}>" <{if $menu_2.id==$province_id}>selected<{/if}>><{$menu_2.name}></option>
				 <{/foreach}>
              </select>
            </div>
			市
            <div class="layui-input-inline">
              <select  name="city_id" id='city' lay-filter="city">
				 <option value="0" >请选择</option>
				 <{foreach from=$citylist key=myId_2 item=menu_2}>
					<option value="<{$menu_2.id}>" <{if $menu_2.id==$city_id}>selected<{/if}>><{$menu_2.name}></option>
				 <{/foreach}>
              </select>
            </div>
			县,区
            <div class="layui-input-inline">
              <select name="country_id" id='country' lay-filter="country">
				 <option value="0" >请选择</option>
				 <{foreach from=$countrylist key=myId_2 item=menu_2}>
					<option value="<{$menu_2.id}>" <{if $menu_2.id==$country_id}>selected<{/if}>><{$menu_2.name}></option>
				 <{/foreach}>
              </select>
            </div>

			<!--门店
            <div class="layui-input-inline">
              <select name="shop_id" id='shop'>
				 <option value="0" >请选择</option>
				 <{foreach from=$shop key=myId_2 item=menu_2}>
					<option value="<{$menu_2.id}>" <{if $menu_2.id==$shop_id}>selected<{/if}>><{$menu_2.name}></option>
				 <{/foreach}>
              </select>
            </div>-->
           <button type='submit' class="layui-btn layui-btn-normal" style="background-color:#FF5722">搜索</button>
        </form> 
     
    </div>

	<div class="table_bd">
    <table class="layui-table">
	 
	  <thead>
	    <tr>
	      <th>问题名称</th>
	      <th>问题内容</th>
		  <th>创建时间</th>
		  <th width="27%">操作</th>
	    </tr> 
	  </thead>
	  <tbody>
		<{section name=list loop=$applist}>
			<tr>
			  <td><{$applist[list].title}></td>
			  <td><{$applist[list].content}></td>
			  <td><{$applist[list].createtime}></td>
			  <td>
			  <a class="layui-btn layui-btn-small" href="?m=admin&o=question&t=questiondetail&id=<{$applist[list].id}>">详情</a>
			  <{if $applist[list].status==0}>
				<!--<a shop_id='<{$applist[list].id}>' href="?m=admin&o=question&t=questiondetail&id=<{$applist[list].id}>" class=" layui-btn layui-btn-normal layui-btn-small">未处理</a>-->
				<a shop_id='<{$applist[list].id}>' href="?m=admin&o=question&t=questiondetail&id=<{$applist[list].id}>" class="layui-btn layui-btn-danger layui-btn-small">未处理</a>
			  <{else}>
				<a shop_id='<{$applist[list].id}>' href="?m=admin&o=question&t=questiondetail&id=<{$applist[list].id}>" class="layui-btn layui-btn-small layui-btn-normal">已处理</a>
			  <{/if}>
			  <!--
              <a href="?m=admin&o=ticket&t=bus_manage_log_list&id=<{$applist[list].id}>" class="layui-btn layui-btn-small layui-btn-warm">开票记录</a>
              <a href="?m=admin&o=ticket&t=statistics&id=<{$applist[list].id}>" class="layui-btn layui-btn-small layui-btn-primary">开票统计</a>
              <a href="?m=admin&o=ticket&t=bus_manage_edit&id=<{$applist[list].id}>" class="layui-btn layui-btn-small">编辑</a>
              <a href='javascript:;' d_href="?m=admin&o=ticket&t=bus_manage_del&id=<{$applist[list].id}>" class="del layui-btn layui-btn-danger layui-btn-small">删除</a>-->
              
              </td>
			</tr>
		<{/section}>
	  </tbody>
	</table>
    </div>
<div align='center'><{$page_menu}></div>
      
  </div>
</div>
<script>
//重新渲染表单
	function renderForm(){
	  layui.use('form', function(){
	   var form = layui.form();//高版本建议把括号去掉，有的低版本，需要加()
	   form.render();
	  });
	 }

layui.use(['form','tree','layer'], function(){
  var form = layui.form();
  var layer = layui.layer;
  form.on('select(province)', function(data){
	  var province = $('#province').val();
      $.ajax({
		   type: "POST",
		   url: "index.php?m=admin&o=question&t=city",
		   dataType:"json",
		   data: {province:province},
		   success: function(msg){
			var msg = JSON.stringify(msg);
			msg = JSON.parse(msg);
			//console.log(aaa);
			var str = '';
			for (var key in msg){
				var str = str+"<option value='"+msg[key]['id']+"'>"+msg[key]['name']+"</option>";
			}
			$("#city").html("<option value='0' >选择市</option>");
			$("#city").append(str);
			$("#country").html("");
			$("#country").html("<option value='0' >选择县区</option>");
			$("#country").append(str);
			form.render();
			/*$.ajax({
				   type: "POST",
				   url: "index.php?m=admin&o=question&t=getareashop",
				   dataType:"json",
				   data: {selectid:province,area:'province_id'},
				   success: function(msg){
					    var msg = JSON.stringify(msg);
						msg = JSON.parse(msg);
						//console.log(aaa);
						var strr = '';
						for (var key in msg){
							var strr = strr+"<option value='"+msg[key]['id']+"'>"+msg[key]['name']+"</option>";
						}
						$("#shop").html("<option value='0' >选择门店</option>");
						$("#shop").append(strr);
						form.render();
				   }
			});*/
		   }
		});
  });
    form.on('select(city)', function(data){
	  var city = $('#city').val();
      $.ajax({
		   type: "POST",
		   url: "index.php?m=admin&o=question&t=country",
		   dataType:"json",
		   data: {city:city},
		   success: function(msg){
			var msg = JSON.stringify(msg);
			msg = JSON.parse(msg);
			//console.log(aaa);
			var str = '';
			for (var key in msg){
				var str = str+"<option value='"+msg[key]['id']+"'>"+msg[key]['name']+"</option>";
			}
			$("#country").html("<option value='0' >选择县区</option>");
			$("#country").append(str);
			form.render();
			/*$.ajax({
				   type: "POST",
				   url: "index.php?m=admin&o=question&t=getareashop",
				   dataType:"json",
				   data: {selectid:province,area:'city_id'},
				   success: function(msg){
					    var msg = JSON.stringify(msg);
						msg = JSON.parse(msg);
						//console.log(aaa);
						var strr = '';
						for (var key in msg){
							var strr = strr+"<option value='"+msg[key]['id']+"'>"+msg[key]['name']+"</option>";
						}
						$("#shop").html("<option value='0' >选择门店</option>");
						$("#shop").append(strr);
						form.render();
				   }
			});*/
		   }
		});
  });
  form.on('select(country)', function(data){
		/*var country = $('#country').val();
		$.ajax({
				   type: "POST",
				   url: "index.php?m=admin&o=question&t=getareashop",
				   dataType:"json",
				   data: {selectid:province,area:'country_id'},
				   success: function(msg){
					    var msg = JSON.stringify(msg);
						msg = JSON.parse(msg);
						//console.log(aaa);
						var strr = '';
						for (var key in msg){
							var strr = strr+"<option value='"+msg[key]['id']+"'>"+msg[key]['name']+"</option>";
						}
						$("#shop").html("<option value='0' >选择门店</option>");
						$("#shop").append(strr);
						form.render();
				   }
			});*/
  });
});
</script>